package com.ktwlsoft.fundmanage.domain.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 出账入账类型配置
 *
 * @author name on 2019/8/20 10:45
 * @version 1.0
 */
@ApiModel("出账入账类型配置-PayInType")
@Entity
@Getter
@Setter
public class PayInType extends BaseEntity{

	/**主键*/
	@ApiModelProperty("主键")
	@Id
	@Column(name = "id",columnDefinition = "bigint(30) NOT NULL COMMENT '主键'")
	private Long id;

	/**支付类型*/
	@ApiModelProperty("支付类型")
	@Column(name = "pay_type",columnDefinition = "varchar(30) DEFAULT NULL COMMENT '支付类型'")
	@Enumerated(EnumType.STRING)
	private PayType payType;

	/**属性名称*/
	@ApiModelProperty("属性名称")
	@Column(name = "type_name",columnDefinition = "varchar(20) DEFAULT NULL COMMENT '属性名称'")
	private String typeName;

	/**编码*/
	@ApiModelProperty("编码")
	@Column(name = "pay_code",columnDefinition = "varchar(20) DEFAULT NULL COMMENT '属性名称'")
	private String payCode;

	/**是否启用*/
	@ApiModelProperty("是否启用")
	@Column(name = "active",columnDefinition = "bit DEFAULT 0 COMMENT '是否启用'")
	private boolean active;

	/**备注*/
	@ApiModelProperty("备注")
	@Column(name = "remark",columnDefinition = "varchar(50) DEFAULT NULL COMMENT '备注'")
	private String remark;

	/**是否出账*/
	@ApiModelProperty("是否出账")
	@Column(name = "is_out",columnDefinition = "bit DEFAULT 0 COMMENT '是否出账'")
	private boolean isOut;

	/**支付类型*/
	public enum PayType{
		/**
		 * 付款方式
		 */
		PAYIN_METHOD,
		/**
		 * 付款标志
		 */
		PAYIN_FLAG,
		/**
		 * 付款类型
		 */
		PAYIN_TYPE,

		/**
		 * 划款方式-出账时使用
		 */
		FUND_OUT_TYPE;
	}

}
